<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    arguments是参数对象,拥有属性
    arguments.length:统计参数的个数
    <script>
        function sum(){
            // console.log(arguments);//参数对象
            // console.log(arguments.length);//参数数量
            // console.log(arguments[10]);//按照下标查找参数
            for(var i=0,result=0;i<arguments.length;i++){
                result+=arguments[i]
            }
            return result
        }
       console.log(sum(100,232,5354,3765,8856,8,64,2,52,345,235,23534,5,435,34,645,7,56,867,9,76,100,232,5354,3765,8856,8,64,2,52,345,235,23534,5,435,34,645,7,56,867,9,76,100,232,5354,3765,8856,8,64,2,52,345,235,23534,5,435,34,645,7,56,867,9,76,100,232,5354,3765,8856,8,64,2,52,345,235,23534,5,435,34,645,7,56,867,9,76,100,232,5354,3765,8856,8,64,2,52,345,235,23534,5,435,34,645,7,56,867,9,76,100,232,5354,3765,8856,8,64,2,52,345,235,23534,5,435,34,645,7,56,867,9,76,100,232,5354,3765,8856,8,64,2,52,345,235,23534,5,435,34,645,7,56,867,9,76,9,870,56,456,34556,34,5234,523,5,32,565476,54,654,654,6,345,6,3456,34,5,34534)); 
    </script>
</body>
</html>